home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / dld-3_23.lha / dld-3.2.3 / mk_dummy.c < prev    next >
C/C++ Source or Header  |  1991-05-30  |  1KB  |  43 lines

  1. /* mk_dummy.c -- create a dummy file_entry for definitions and
  2.    declarations of symbols explicitly make by the user. */
  3.  
  4. /* This file is part of DLD, a dynamic link/unlink editor for C.
  5.    
  6.    Copyright (C) 1990 by W. Wilson Ho.
  7.  
  8.    The author can be reached electronically by how@cs.ucdavis.edu or
  9.    through physical mail at:
  10.  
  11.    W. Wilson Ho
  12.    Division of Computer Science
  13.    University of California at Davis
  14.    Davis, CA 95616
  15.  */
  16.  
  17. /* This program is free software; you can redistribute it and/or modify it
  18.    under the terms of the GNU General Public License as published by the
  19.    Free Software Foundation; either version 1, or (at your option) any
  20.    later version. */
  21.  
  22. #include "defs.h"
  23.  
  24. void
  25. _dld_create_dummy_entry () {
  26.  
  27.     register struct file_entry *entry;
  28.     
  29.     if (_dld_dummy_entry)
  30.     return;
  31.  
  32.     entry = (struct file_entry *) _dld_malloc (sizeof (struct file_entry));
  33.  
  34.     bzero (entry, sizeof (struct file_entry));
  35.     entry->filename = entry->local_sym_name = "-*- dummy entry -*-";
  36.     entry->chain = _dld_latest_entry;
  37.     _dld_latest_entry = entry;
  38.     entry->ref_count = 1;
  39.     _dld_dummy_entry = entry;
  40.  
  41.     return;
  42. } /* _dld_create_dummy_entry */
  43.